<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/layouts/include.inc.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="${ctx }/styles/v2/css/information.css" />
<script type="text/javascript" src="${ctx }/styles/v2/js/show.js"></script>

<script type="text/javascript">
window.onload=function(){
	var now=new Date();
	var year=now.getFullYear();
	var month=now.getMonth();
	var day=now.getDate();
	//document.getElementById("show").value=year+"-"+(month+1)+"-"+day;
	var s=year+"-"+(month+1)+"-"+day;
	//document.write(s);
	document.all.show.innerHTML=s;
	
};
</script>
<style type="text/css">
.hidden {
	display: none;
}

#smallLay {
	width: 650px;
	height: 750px;
	padding: 4px 10px 10px;
	background-color: #FFFFFF;
	border: 1px solid #05549d;
	color: #333333;
	line-height: 24px;
	text-align: left;
	-webkit-box-shadow: 5px 2px 6px #000;
	-moz-box-shadow: 3px 3px 6px #555;
}
</style>

</head>
<body style="height:100%;" onload="showLeftTime();">

	<div class="op">
		<div class="cz">
			<p style="font-size: 18px;">操作栏</p>
		</div>

		<%@ include file="/WEB-INF/views/v2/publicDoc/left.jsp"%>
	</div>
	<div class="con">
		<!--导航begin-->
		<%@ include file="/WEB-INF/layouts/nav.jsp"%>
		<!--导航end-->

		<p class="gg">公共场所详细页</p>
		<table style="width:100%;text-align:right;">
			<tr>
				
				<td style="width:100%;">
					<a href="${ctx}/v2/publicDoc/edit?ids=${obj.id}" class="bt3" >编辑</a>
					<input class="bt4"  name="b_print" type="button" class="ipt bt4"  onClick="printdiv('div_print');" value=" 打印 " />
	     		</td>
			</tr>
		</table>
		
			<script type="text/javascript">
		function printdiv(printpage){
			var headstr = "<html><head><title></title></head><body>";
			var footstr = "</body>";
			var newstr = document.all.item(printpage).innerHTML;
			var oldstr = document.body.innerHTML;
			document.body.innerHTML = headstr+newstr+footstr;
			window.print(); 
			document.body.innerHTML = oldstr;
			return false;
		}
	</script>
	<div id="div_print">
		<div class="information">
			<table border="1" cellspacing="0" cellpadding="0" class="table_1">
				<tr>
					<td colspan="4" class="td_1">基本信息</td>

				</tr>
				<tr>
					<td class="td_8"  width="20%">单位名称&nbsp;</td>
					<td class="td_9"  width="30%">
					<c:choose>
								<c:when test="${empty obj.companyName}">
								   /
								</c:when>
								<c:otherwise>
									${obj.companyName }
								</c:otherwise>
							</c:choose>
					</td>
					<td class="td_8"  width="20%">档案编号&nbsp;</td>
					<td class="td_9"  width="30%">${obj.code }</td>
				</tr>
				<tr>
					<td class="td_8">负责人/法人代表&nbsp;</td>
					<td class="td_9">${obj.legal }</td>
					<td class="td_8">联系号码&nbsp;</td>
					<td class="td_9">
					<c:choose>
								<c:when test="${empty obj.phone}">
								   /
								</c:when>
								<c:otherwise>
									${obj.phone }
								</c:otherwise>
							</c:choose>
					</td>
				</tr>
				<tr>
					<td class="td_8">经营地址&nbsp;</td>
					<td colspan="3" class="td_9">${obj.address }</td>

				</tr>
				<tr>
					<td class="td_8">状态&nbsp;</td>
					<td class="td_9">${obj.state }</td>
					
					<td class="td_8">经营面积&nbsp;</td>
					<td class="td_9" >
					<c:choose>
								<c:when test="${empty obj.area}">
								   /
								</c:when>
								<c:otherwise>
									${obj.area }
								</c:otherwise>
							</c:choose>
					</td>
					
				</tr>
				<tr>
					<td class="td_8">是否有卫生许可证&nbsp;</td>
					<td class="td_9"  colspan="3">${obj.hasLicense }</td>
					
				</tr>
				<tr>
				<td class="td_8">卫生许可证&nbsp;</td>
					<td class="td_9">
					<c:choose>
								<c:when test="${empty obj.license}">
								   /
								</c:when>
								<c:otherwise>
									${obj.license }
								</c:otherwise>
							</c:choose>
					</td>
					<td class="td_8">许可项目&nbsp;</td>
					<td class="td_9">
						<c:choose>
								<c:when test="${empty obj.projects}">
								   /
								</c:when>
								<c:otherwise>
									${obj.projects }
								</c:otherwise>
							</c:choose>
					</td>
					
				</tr>
				
					<tr>
					
					<td class="td_8">发证日期&nbsp;</td>
					<td class="td_9">
						<c:choose>
								<c:when test="${empty obj.issueDate}">
								   /
								</c:when>
								<c:otherwise>
									<c:set var="date" value="${fn:split(obj.issueDate,' ') }"></c:set>
									${date[0]}
								</c:otherwise>
							</c:choose>
					</td>
					
					
				<td class="td_8">许可证有效日期&nbsp;</td>
					<td class="td_9">
						<c:choose>
								<c:when test="${empty obj.endDate}">
								   /
								</c:when>
								<c:otherwise>
									
									<c:set var="date" value="${fn:split(obj.endDate,' ') }"></c:set>
									${date[0]}
								</c:otherwise>
							</c:choose>
					</td>
				
				</tr>
					<tr>
					<td class="td_8">有无工商执照&nbsp;</td>
					<td class="td_9"  colspan="3">
						<c:choose>
								<c:when test="${empty obj.hasgongshangcode}">
								   /
								</c:when>
								<c:otherwise>
									${obj.hasgongshangcode }
								</c:otherwise>
							</c:choose>
					</td>
					
				</tr>
				<tr>
					<td class="td_8">工商执照号码&nbsp;</td>
					<td class="td_9" >
					${obj.gongshangcode }
					</td>
					<td class="td_8">工商执照有效日期&nbsp;</td>
					<td class="td_9">
						<c:choose>
								<c:when test="${empty obj.gongshangDate}">
								   /
								</c:when>
								<c:otherwise>
									
									<c:set var="date" value="${fn:split(obj.gongshangDate,' ') }"></c:set>
									${date[0]}
								</c:otherwise>
							</c:choose>
					</td>
				</tr>
				<tr>
					<td class="td_8">许可证有效期截止&nbsp;</td>
					<td class="td_9">
					<c:choose>
								<c:when test="${empty obj.endDate}">
								   /
								</c:when>
								<c:otherwise>
									<c:set var="date" value="${fn:split(obj.endDate,' ') }"></c:set>
									${date[0]}
								</c:otherwise>
							</c:choose>
					</td>
					<td class="td_8">经营类别&nbsp;</td>
					<td class="td_9">${obj.runType }—${obj.runClass }</td>
				</tr>
				<tr>
					<td class="td_8">从业人员数&nbsp;</td>
					<td class="td_9">${obj.peopleNum }
	
					</td>
					<td class="td_8">有效健康证明数&nbsp;</td>
					<td class="td_9">
					<c:choose>
								<c:when test="${empty obj.trainNum}">
								   /
								</c:when>
								<c:otherwise>
									${obj.trainNum }
								</c:otherwise>
							</c:choose>
					</td>
				</tr>
				<tr>
					<td class="td_8">消毒情况&nbsp;</td>
					<td class="td_9">
					${obj.disinfect }
				
					</td>
					<td class="td_8">年检/复核换证情况&nbsp;</td>
					<td class="td_9">
					<c:choose>
								<c:when test="${empty obj.checkInfo}">
								   /
								</c:when>
								<c:otherwise>
									${obj.checkInfo }
								</c:otherwise>
							</c:choose>
					</td>
				</tr>
				
				
				<tr>
					<td class="td_8">档案备注信息&nbsp;</td>
					<td class="td_9">

									${obj.remark }
							
					</td>
					<td class="td_8">建档机构&nbsp;</td>
					<td class="td_9">${obj.createCompany }</td>
					
				</tr>
				<tr>
				<td class="td_8">建档人&nbsp;</td>
					<td class="td_9">${obj.createUserName }</td>
					<td class="td_8">建档日期&nbsp;</td>
					<td class="td_9"> 
						<c:set var="date" value="${fn:split(obj.createDate,' ') }"></c:set>
						${date[0]}
					</td>
				</tr>
					<c:set var="imgs" value="${fn:split(obj.imagesURL,';') }"></c:set>
					<c:forEach items="${imgs }" var="img" varStatus="status">
					<c:choose>
						<c:when test="${fn:contains(img,'.jpg')}">
							<tr>
								<td  class="td_8" style="width:20%;">附加照片&nbsp;</td>
								<td colspan="3" style="padding: 5px;width: 80px;"><img src="${ctx }${img }" width="80" height="80"></td>
							
								</tr>
						</c:when>
						<c:when test="${fn:contains(img,'.JPG')}">
							<tr>
								<td  class="td_8" style="width:20%;">附加照片&nbsp;</td>
								<td colspan="3" style="padding: 5px;width: 80px;"><img src="${ctx }${img }" width="80" height="80"></td>
								</tr>
						</c:when>
						<c:when test="${fn:contains(img,'.png')}">
							<tr>
								<td  class="td_8" style="width:20%;">附加照片&nbsp;</td>
								<td  colspan="3" style="padding:5px;width:80px;"><img src="${ctx }${img }" width="80" height="80"></td>
								</tr>
						</c:when>
						<c:when test="${fn:contains(img,'.gif')}">
							<tr>
								<td  class="td_8" style="width:20%;">附加照片&nbsp;</td>
								<td colspan="3" style="padding: 5px;width: 80px;"><img src="${ctx }${img }" width="80" height="80"></td>
								</tr>
						</c:when>
	                   <c:when test="${fn:contains(img,'.doc')}">
								<tr>
							<td class="td_8" style="width:20%;">文件下载&nbsp;</td>
								<td colspan="2" style="padding: 5px;width: 80px;">无缩率图</td>
								<td  class="td_9" style="text-align:center;"><a href="${ctx }${img}">word下载</a></td>
							</tr>	
						</c:when>
					   <c:when test="${fn:contains(img,'.mp3')}">
								<tr>
								<td  class="td_8" style="width:20%;">音频下载&nbsp;</td>
								<td colspan="2" style="padding: 5px;width: 80px;">无缩率图</td>
								<td  class="td_9" style="text-align:center;"><a href="${ctx }/${img}">音频下载</a></td>
							</tr>	
						</c:when>
						<c:otherwise>	
												
						</c:otherwise>
					</c:choose>
				</c:forEach>

			</table>
		</div>
		</div>	
			<p class="pp">
				<span class="jiandu">监督记录</span> <!--<span class="niandu">本年共指导：3次</span> <span>本季度共指导：2次</span> <span>本月共指导：1次</span> -->
				<a class="xinzen"  href="${ctx }/v2/publicSupervise/add?ids=${obj.id }">新增指导记录</a>
				
				
				<c:if test="${fn:contains(obj.runType,'理发美容场所') == true}">
				<a href="javascript:void(0)" class="dayin" onclick="window.open ('${ctx}/v2/publicDoc/hairopinion?id=${obj.id }','printWindow','height=980,width=835,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no') ">指导书打印模板</a>
				</c:if>
				<c:if test="${fn:contains(obj.runType,'其它公共场所') == true}">
				<a href="javascript:void(0)" class="dayin" onclick="window.open ('${ctx}/v2/publicDoc/otheropinion?id=${obj.id }','printWindow','height=980,width=835,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no') ">指导书打印模板</a>
				</c:if>
				<c:if test="${fn:contains(obj.runType,'住宿场所') == true}">
				<a href="javascript:void(0)" class="dayin" onclick="window.open ('${ctx}/v2/publicDoc/liveopinion?id=${obj.id }','printWindow','height=980,width=835,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no') ">指导书打印模板</a>
				</c:if>
				<c:if test="${fn:contains(obj.runType,'沐浴场所') == true}">
				<a href="javascript:void(0)" class="dayin" onclick="window.open ('${ctx}/v2/publicDoc/showeropinion?id=${obj.id }','printWindow','height=980,width=835,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no') ">指导书打印模板</a>
				</c:if>
				<c:if test="${fn:contains(obj.runType,'游泳场所') == true}">
				<a href="javascript:void(0)" class="dayin" onclick="window.open ('${ctx}/v2/publicDoc/otheropinion?id=${obj.id }','printWindow','height=980,width=835,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no') ">指导书打印模板</a>
				</c:if>
				<input class="xinzen1"  name="b_print" type="button" class="ipt xinzen1"  onClick="printdiv('div_print1');" value=" 打印 " />
			</p>
		<div class="record">
			<div id="div_print1">
			<table border="1" cellspacing="0" cellpadding="0" class="table_2">
				<tr>
					<td width="10%">序号</td>
					<td width="10%">记录类型</td>
					<td width="10%">监督指导时间</td>
					<td width="50%">指导记录</td>
					<td width="10%">指导人</td>
					<td width="10%">操作</td>
				</tr>

				<c:forEach items="${superviseList }" var="obj" varStatus="status">
					<tr>
						<td>${status.count }</td>
						<td>${obj.type }</td>
						<td><fmt:formatDate value="${obj.guideDate}" type="date" /></td>
						<td style="width: 300px">
									
							<c:choose>
								<c:when test="${empty obj.context}">
								   未发现问题
								</c:when>
								<c:otherwise>
									${obj.context }
								</c:otherwise>
							</c:choose>
						</td>
						<td>${obj.userName }</td>
						<td>
							<ul>
								<li><a class="various1" href="${ctx }/v2/publicSupervise/detail?id=${obj.id }" >详细</a></li>
								<li><a href="${ctx }/v2/publicSupervise/edit?ids=${obj.id}">修改</a>
								</li>
							</ul>
						</td>
					</tr>
				</c:forEach>



				<!-- <tr>
					<td>2</td>
					<td>日常指导</td>
					<td>2014-10-15</td>
					<td>未取得卫生许可证不得擅自营业，应及时到相关部门申请办理卫生许可证；</td>
					<td>协管员</td>
					<td>
						<ul>
							<li><a href="#" id="showbtn" name="showbtn" value="点我弹出层" onclick="showid('smallLay');">详细</a></li>
							<a href="../supervise/edit.html">修改</a>
							</li>
						</ul>
					</td>
				</tr>
				<tr>
					<td>3</td>
					<td>日常指导</td>
					<td>2014-10-15</td>
					<td>卫生许可证、健康证明等相关证件应当悬挂在营业场所内醒目位置进行公示上墙</td>
					<td>协管员</td>
					<td>
						<ul>
							<li><a href="#" id="showbtn" name="showbtn" value="点我弹出层" onclick="showid('smallLay');">详细</a></li>
							<a href="../supervise/edit.html">修改</a>
							</li>
						</ul>
					</td>
				</tr> -->
			</table>
		</div>
	</div>
		<div class="other">
			<p>其他信息</p>
			<table border="1" cellspacing="0" cellpadding="0" class="table_3">
				<tr>
					<td  width="25%">建档机构</td>
					<td colspan="3"  width="75%">${obj.createCompany }</td>
				</tr>
				<tr>
					<td  width="25%">建档日期</td>
					<td  width="25%">
						<c:set var="date" value="${fn:split(obj.createDate,' ') }"></c:set>
						${date[0]}
					</td>
					<td  width="25%">建档人</td>
					<td  width="25%">${obj.createUserName }</td>
				</tr>
				<tr>
					<td>当前登记日期</td>
					<td>
						<label id="show"></label>
					</td>
					<td>当前登记人</td>
					<td>${user.realname }</td>
				</tr>
			</table>
			<br/>
			<div style="width:100%;">
			<input type="button" style="display:block;width: 70px;margin:0 auto;text-align:center; height: 35px; border: none; border-radius: 5px; background-color: #d6585b; color: white; font-size: 15px;line-height:35px;" value="返回" onclick="javascript:history.back(-1);"/>
			</div>
		</div>
	</div>



	<!--弹出层-->
	<!-- <div style="display:none;">
		<div id="inline1" style="width:600px;overflow:auto; ">
		<h1>详情</h1>
		<hr />
		<table border="1" cellpadding="0" cellspacing="0" class="table">
		<tr>
			<td class="td_8" width="20%">档案编号:</td>
			<td class="td_9" width="30%" >&nbsp;142465465278947</td>
			<td class="td_8" width="20%">单位名称:</td>
			<td class="td_9" width="30%">&nbsp;杭州市红苹果小旅馆</td>
			
		</tr>
		<tr>
			<td class="td_8">负责人/法人代表:</td>
			<td class="td_9">&nbsp;韩群</td>
			<td class="td_8">联系号码:</td>
			<td class="td_9">&nbsp;1383846578</td>
			
		</tr>
		<tr>
			<td class="td_8">经营地址:</td>
			<td colspan="3" class="td_9">&nbsp;杭州市大洋街道临东村81号 </td>
		
			
		</tr>
		<tr>
			<td class="td_8">状态:</td>
			<td class="td_9">&nbsp;营业</td>
			<td class="td_8">许可项目:</td>
			<td class="td_9">&nbsp;旅店</td>
			
		</tr>
		<tr>
			<td class="td_8">卫生许可证号:</td>
			<td colspan="3" class="td_9">&nbsp;浙卫公证字[2013]第331082M00073号</td>
			
			
		</tr>
		<tr>
			<td class="td_8">经营类别:</td>
			<td class="td_9">&nbsp;住宿</td>
			<td class="td_8">从业人员数:</td>
			<td  class="td_9">&nbsp;2</td>
		</tr>
		<tr>
			<td class="td_8">有效健康证明:</td>
			<td class="td_9">&nbsp;2</td>
			<td></td>
			<td></td>
		</tr>
	<tr style="height:100px;">
			<td  class="td_8">存在问题:</td>
			<td colspan="3">
				&nbsp;&nbsp;无有效卫生许可证或卫生许可证超过有效期限（有效期至  　年  月   日）　(<a href="javascript:void(0)" onclick="window.open ('../view/report.html','printWindow','height=980,width=835,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no') ">指导书打印</a>)
			</td>
			
		</tr>
		<tr style="height:100px;">
			<td  class="td_8">整改意见:</td>
			<td colspan="3">&nbsp;&nbsp;公共场所应及时办理有效卫生许可证的申办、变更、延续，未取得卫生许可证的，不得营业 &nbsp;&nbsp;&nbsp;(<a href="javascript:void(0)" onclick="window.open ('../view/opinion.html','printWindow','height=980,width=835,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no') ">意见书打印</a>) </td>
			
		</tr>
	</table>
	</br>
	<p style="text-align:center;"><input type="button" id="btn_2" value="取消"/></p>
	</div>
</div> -->
<!--弹出层end-->

</body>
</html>